/*
 * Copyright 2023, Haiku, Inc. All rights reserved.
 * Distributed under the terms of the MIT License.
 */
#ifndef ANT_CALENDAR_VIEW_H
#define ANT_CALENDAR_VIEW_H


#include <View.h>
#include <StringView.h>
#include <GridLayout.h>
#include <Button.h>
#include <DateTime.h>


class AntCalendarView : public BView {
public:
						AntCalendarView(const char* name);
	virtual				~AntCalendarView();

	virtual void		AttachedToWindow();
	virtual void		MessageReceived(BMessage* message);



private:
	void				_InitInterface();
	void				_UpdateCalendar();
	void				_UpdateMonthYear();
	void				_GetLunarDate(int year, int month, int day, BString& lunarDate);

	BGridLayout*		fCalendarGrid;
	BStringView*		fMonthYearView;
	BButton*			fPrevMonthButton;
	BButton*			fNextMonthButton;
	BStringView**		fDayLabels;
	BButton**			fDayButtons;

	int					fCurrentYear;
	int					fCurrentMonth;
	int					fCurrentDay;
	int					fSelectedYear;
	int					fSelectedMonth;
	int					fSelectedDay;
};


#endif // ANT_CALENDAR_VIEW_H